import request from '@/axios/axios.js'

// 设备信息
export const getDeviceList = (params) => {
    return request({
        method: 'post',
        url: '/dms/device/page',
        data: params
    })
}
//根据设备编码查询工单信息
export const selectWorkOrderByDevice = (params) => {
    return request({
        method: 'GET',
        url: '/dms/productionWork/selectWorkOrderByDevice',
        params,
    })
}
//更换模具列表
export const getMoldList = (params) => {
    return request({
        method: 'POST',
        url: '/dms/productionWork/replaceMoldPage',
        data: params
    })
}

//更换模具
export const replaceMold = (params) => {
    return request({
        method: 'put',
        url: '/dms/productionWork/replaceMold',
        data: params
    })
}
//重新排序
export const reSortPage = (params) => {
    return request({
        method: 'post',
        url: '/dms/productionWork/reSortPage',
        data: params
    })
}

//转移机台列表
export const transferDevicePage = (params) => {
    return request({
        method: 'POST',
        url: '/dms/productionWork/transferDevicePage',
        data: params
    })
}
//转移机台
export const transferDevice = (params) => {
    return request({
        method: 'put',
        url: '/dms/productionWork/transferDevice',
        data: params
    })
}

export const exportApi= (params) => {
    return request({
        method: 'post',
        url: '/dms/productionWork/exportWorkByDeviceCode',
        responseType: 'blob',
        data: params
    })
}


